package com.soft.javase.ch02.test06;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/18
 */
public class Goods {

    private String name;
    private double price;
    private int num;
    private String detail;

    public Goods() {
    }

    public Goods(String name, double price, int num, String detail) {
        this.name = name;
        this.price = price;
        this.num = num;
        this.detail = detail;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return price
     */
    public double getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(double price) {
        this.price = price;
    }

    /**
     * 获取
     * @return num
     */
    public int getNum() {
        return num;
    }

    /**
     * 设置
     * @param num
     */
    public void setNum(int num) {
        this.num = num;
    }

    /**
     * 获取
     * @return detail
     */
    public String getDetail() {
        return detail;
    }

    /**
     * 设置
     * @param detail
     */
    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String toString() {
        return "Goods{name = " + name + ", price = " + price + ", num = " + num + ", detail = " + detail + "}";
    }
}
